<?php
//admin管理模块
class main extends spController
{
	function __construct(){ // 公用
		parent::__construct(); // 这是必须的
		$this->tpl_title = "后台模块|主题部分";
	}
	
	function index(){ // 这里是首页
		$this->contents = "后台模块首页内容";
		$this->display("admin/main_index.html");
	}
	
	function page(){ // 其他内容
		$this->aas ="2";
		$this->aab ="1";
		$this->contents = "后台模块其他内容";
		$this->display("admin/main_page.html");
	}
	
	function user()
	{
		$user=spClass('user');
		$list = $user->findall();
		//dump($list);
		
		$this->list=$list;
		$this->display("admin/main_user.html");
	}
	
	function e_update()
	{		
		$data = $this->spArgs();
		$Model=spClass('user');
		$where['userid'] =$data['userid'];
		if($Model->update ( $where, $data ))
		{
			echo '修改成功';
		}
		else 
		{
			echo '修改失败';
		}

	}
	
	
	//lj
}	